home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 61
/
061.d81
/
vcr library
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
11KB
|
389 lines
100 rem trasmart software
101 rem vcr library
102 gosub448:goto161
103 :
104 s=54272:pokes+1,112:pokes+5,10:pokes+6,9:pokes+24,15:pokes+4,17:pokes+4,16
105 return
106 :
107 l=len(k$):m=38-l/2:fori=1tolen(k$)-19
108 printl$spc(m)left$(k$,i)right$(k$,l-(l-i)):m=m-1:next:return
109 :
110 sys49152
111 print"[147] [158]q to quit [158]p to pause / resume"
112 open8,8,0,"$0:*=r"
113 get#8,a$,b$:n$=chr$(0)
114 get#8,a$,b$:ifb$=""then123
115 get#8,a$,b$:a=asc(a$+n$):b=asc(b$+n$)
116 c$=mid$(str$(a+256*b),2)+chr$(32)
117 print" ";
118 printc$;:get#8,c$:ifc$<>""then118
119 print:getk$:ifk$="p"ork$="q"then121
120 getk$
121 ifk$="p"thenwait197,1:goto120
122 ifk$<>"q"then114
123 close8
124 print"[156]press space to continue[146]"
125 s=54272:pokes+1,112:pokes+5,10:pokes+6,9:pokes+24,15:pokes+4,17:pokes+4,16
126 ifpeek(203)<>60then126
127 goto177
128 :
129 poke198,0:y$="":z$=""
130 print"[156]_[157][146]";
131 forn=1to75 :getz$:ifz$<>""then137
132 next
133 print"_[157]";
134 forn=1to75 :getz$:ifz$<>""then137
135 next
136 getz$:ifz$=""then130
137 l=len(y$)
138 ifz$=chr$(13)andre=1thenprint"[156][157] ":return
139 ifz$=chr$(13)thenprint"[157] ":return
140 ifz$=chr$(20)andlandre=1thenprint"[156] [157][157]";:y$=left$(y$,l-1):goto130
141 ifz$=chr$(20)andlthenprint" [157][157]";:y$=left$(y$,l-1):goto130
142 ifhl=2orhl=19thenif(z$<"a"orz$>"z")andz$<>" "and(z$<"0"orz$>"9")then130
143 ifhl=1orhl=3orhl=4thenif(z$<"0"orz$>"9")andz$<>" "then130
144 ifl>=hlthen130
145 ifre=1thenprint"[156]";z$;:y$=y$+z$:goto130
146 printz$;:y$=y$+z$
147 goto130
148 :
149 input#15,e,e$,a,b
150 ife=0ore=73thenreturn
151 ife=50thenreturn
152 print"there is an i/o problem"
153 print"error # is";e;" ";e$
154 print"track";a;"; sector";b
155 close8:close15
156 print"[156]press space to continue[146][145][145]";
157 ifpeek(203)=64then157
158 ifpeek(203)<>60then157
159 goto177
160 close8:close15:end
161 :
162 h=0
163 sp$=" "
164 open15,8,15,"i0":close15
165 f$="vcr library.ml":poke147,0:sys57812f$,8,1:sys62631
166 ll$=chr$(13)
167 ln=40
168 open15,8,15
169 gosub148
170 close8:close15
171 k$="[152][221] instructions (y/n) [221]":l$=l$+"":gosub107
172 poke198,0
173 ifpeek(203)=64then173
174 ifpeek(203)=39then177
175 ifpeek(203)=25thenis=1:gosub362:goto177
176 goto172
177 sys49152
178 print"[147][156][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
179 print"[221] r[156]ead a tape";
180 print" w[156]rite a tape";
181 print" e[156]dit tape [221]";
182 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
183 print"[221] p[156]rint label";
184 print" c[156]reate file";
185 print" d[156]irectory [221]";
186 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
187 print"[221] h[156]elp screen";
188 print" s[156]ee all files";
189 print" l[156]oadstar [221]";
190 print"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]";
191 poke198,0
192 geta$:ifa$=""ora$=" "then192
193 gosub104
194 ifa$=chr$(80)ora$=chr$(87)ora$=chr$(82)then201
195 ifa$=chr$(67)ora$=chr$(69)then201
196 ifa$=chr$(76)then325:rem l
197 ifa$=chr$(68)then109:rem d
198 ifa$=chr$(83)then398:rem s
199 ifa$=chr$(72)thenh=1:goto362:rem h
200 goto177
201 print"[145][156][171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179][146]"
202 print"[145][156][221]what tape number to [221][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
203 print"[156][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]"
204 print"[145][145][145]"spc(21);
205 ifa$=chr$(80)thenprint"print ";
206 ifa$=chr$(87)thenprint"write ";
207 ifa$=chr$(82)thenprint"read ";
208 ifa$=chr$(67)thenprint"create ";
209 ifa$=chr$(69)thenprint"edit ";
210 ifa$<chr$(65)ora$>chr$(90)then178
211 re=1:hl=3:gosub129:v$=y$:re=0
212 gosub104
213 ifval(v$)<1thenprint"file # must be greater than 0"
214 ifval(v$)>200thenprint"file # must be less than 200"
215 ifval(v$)<1orval(v$)>200thenprint"[156]press space to continue[146]"
216 ifval(v$)<1orval(v$)>200thenwait197,4:a$="":goto177
217 vw=0
218 ifa$=chr$(80)then332:rem p
219 ifa$=chr$(82)then225:rem r
220 ifa$=chr$(87)then255:rem w
221 ifa$=chr$(67)then277:rem c
222 ifa$=chr$(69)then294:rem e
223 goto177
224 :
225 :
226 open15,8,15
227 gosub148
228 print#15,"r0:"+v$+"="+v$:input#15,er
229 if er<>63 then printspc(13)"file is empty [156]":rn=8:goto246
230 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
231 gosub148
232 rn=1
233 rem return here for line 2 - 7
234 gosub331
235 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
236 gosub148
237 input#8,aa$,bb$,cc$,dd$,ee$
238 gosub148
239 ifaa$="[255]"andrn=1thenprintspc(13)"file is empty [156]":rn=8:goto246
240 ifaa$="[255]"thenrn=8:goto246
241 ifcc$=""thencc$=" deleted[152]"
242 ifrn=1thenprint"[156][221] tape number ";v$;" contains "
243 ifrn=1thenprint"[156][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]";
244 ifrn=1thenprint" title time start [152]"
245 printaa$+". "tab(3)cc$tab(27)bb$tab(34)dd$tab(33)ee$
246 ifrn>=8andvw=1thenclose8:close15:return
247 ifrn>=8thenprint"[156]press space to continue[146]"
248 ifrn>=8thenclose8:close15
249 ifrn>=8thengosub104
250 ifrn>=8thenifpeek(203)<>60then250
251 ifrn>=8then254
252 rn=rn+1
253 goto233
254 goto177
255 :
256 open15,8,15
257 gosub148
258 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
259 gosub148
260 print"ready to write tape #";v$
261 print"line# (1 chr max) ";:hl=1:gosub129:aa$=y$
262 ifaa$=""thenprint"cancelled":forpa=1to800:nextpa:goto275
263 rn=val(aa$)
264 ifrn>=8thenclose8:close15:goto177
265 print"time (4 chr max) ";:hl=4:gosub129:bb$=y$
266 print"title (21 chr max) ";:hl=21:gosub129:cc$=y$
267 print"start (4 chr max) ";:hl=4:gosub129:dd$=y$
268 rc$=aa$+ll$+bb$+ll$+cc$+ll$+dd$+ll$+ee$
269 gosub331
270 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
271 gosub148
272 if e=50 thenprint"the dos will expand the file now"
273 print#8,rc$
274 gosub148
275 close8:close15:goto177
276 :
277 :
278 print""
279 print"setting up file...wait one moment"
280 open15,8,15,"ui"
281 gosub148
282 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
283 gosub148
284 print""
285 rn=7
286 gosub331
287 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
288 gosub148
289 if e<>50thenprint"file "v$" exists"
290 if e=50 thenprint"writing blank file to disk now"
291 print#8,chr$(255)
292 gosub148
293 close8:close15:goto177
294 :
295 vw=1:gosub225:vw=0
296 open15,8,15
297 gosub148
298 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
299 gosub148
300 print"ready to edit tape #";v$
301 gosub104
302 print"line# (1 chr max) ";:hl=1:gosub129:aa$=y$
303 ifaa$=""thenprint"cancelled":forpa=1to999:nextpa:goto315
304 rn=val(aa$)
305 ifrn>=8thenclose8:close15:goto177
306 print"time (4 chr max) ";:hl=4:gosub129:bb$=y$
307 print"title (21 chr max) ";:hl=21:gosub129:cc$=y$
308 print"start (4 chr max) ";:hl=4:gosub129:dd$=y$
309 rc$=aa$+ll$+bb$+ll$+cc$+ll$+dd$+ll$+ee$
310 gosub331
311 print#15,"p"+chr$(96+